//
//  untitled.h
//  hengyong
//
//  Created by 赛锋 张 on 12-5-24.
//  Copyright (c) 2012年 heng yong. All rights reserved.
//

#import <Foundation/Foundation.h>

#define	ShowText	@"txt"
#define	LinkSource	@"link"
#define Type        @"type"

#define StampKey    @"stamps"
#define UserKey     @"users"
#define PoiKey      @"pois"
#define UrlKey      @"links"
#define ExpKey      @"exp"

#define PROTOCOL	@"PROTOCOL"
#define HOST		@"HOST"
#define PARAMS		@"PARAMS"

@interface NSString (NSStringEx) 

- (NSInteger)getChineseCount;
- (CGFloat)getMessageHight:(NSInteger )lineCharaterCount;//正文的
- (BOOL)strCanSend;

+ (BOOL)strIsMail:(NSString *)mailStr;

+ (NSString *) md5: (NSString *) inPutText;
- (NSString *)urlEncode;

- (NSString *)createLinkEnableStr:(NSArray *)list;
- (NSString *)createNoLinkStr:(NSArray *)list;
- (NSString *)createLinkEnableStrByDic:(NSDictionary *)list;
- (NSString *)createLinkEnableStrByArray:(NSArray *)list;
- (NSString *)createNoLinkStrByDic:(NSDictionary *)list;
- (NSString *)createNoLinkStrByArray:(NSArray *)list;

//- (NSString *)createLinkEnableStr:(NSArray *)list withType:(LinkType)type;
//- (NSString *)createNoLinkStr:(NSArray *)list withType:(LinkType)type;

- (id)objectForKey:(id)aKey;
- (NSUInteger)count;


+ (NSString *)getStrFromDistance:(NSInteger)distance;
+ (NSString *)getStrFromPrice:(float)price;
+ (NSString *)getDiscountFromOrgPrice:(CGFloat)orgPrice NowPrice:(CGFloat)nowPrice;

- (NSDictionary *)paramsFromURL;

@end
